<template>
  <div id="app">
    <router-link to="/aboutus">关于我们-一级</router-link>
    <router-link to="/hotnews">最热新闻-一级</router-link>
    <div class="com">
      <!-- 一级路由挂载点 -->
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "App",
  components: {},
  methods: {},
  mounted() {
    console.log(this.$router);
  },
};
</script>

<style>
a {
  text-decoration: none;
  color: #666;
}
#app a {
  margin-right: 10px;
}
.com {
  width: 400px;
  height: 400px;
  border: 1px solid red;
}
/* * router-link-exact-active (精确匹配规则，即只有当前点击router被匹配) */

/* * router-link-active(包含匹配规则)      */
.router-link-active {
  color: red;
}
.router-link-exact-active {
  color: blue;
}
</style>
